<?php

include_once '../common_mbs.inc.php';
include_once '../smarty.inc.php';

//判断访问权限
$admin_index_module_obj = new osgh_admin_index_module_cls();
$is_warrant = $admin_index_module_obj->is_have_warrant($_ADMIN_ID,'user_list');
if(!$is_warrant) tcmc_cls::ShowMsg("没有权限访问！", "../index_body.html");


$user_obj = new user_cls();
$user_name = isset($_REQUEST['user_name']) ? trim($_REQUEST['user_name']) : '';
$where_str = "user_name like '%{$user_name}%'";
$count = $user_obj->get_user_list(true, $where_str);
$page = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : 1;
$p = new show_page_cls;
$page_size = 30;
$p -> pvar="page";
$p -> setvar(array("user_name"=>$user_name));
$p -> set($page_size,$count,$page);
$page_str = $p -> output(true);
$limit = $p -> limit();

$userList = $user_obj->get_user_list(false, $where_str, 'ret_addtime desc', $limit);


$smarty -> assign('user_name' , $user_name);
$smarty -> assign('user_list', $userList);
$smarty -> assign('page_str' , $page_str);
$smarty -> display('user/user_list.tpl');

?>
